Fitting a parametric curve using maximum curvature

ABSTRACT

Parametric curve fitting using maximum curvature techniques are described. In one or more implementations, a parametric curve is fit to a segment of a plurality of data points that includes a first data point disposed between second and third data points by setting a point of maximum curvature for the segment of the curve at the first data point. A result of the fitting is output by the computing device.

BACKGROUND

Curve fitting refers to the fitting of a curve (e.g., path) between datapoints. This may be utilized for a variety of different purposes, suchas to indicate correspondence of the data points, one to another, forspreadsheets, to draw animation paths, plotting temperatures, and so on.

However, conventional techniques that were utilized to perform curvefitting could depart from the expectations of users that availthemselves of the functionality. For example, unexpected peaks, loopsand so on may be observed in a curve fit using conventional techniquesbetween the data points that do not “follow the flow” exhibited by thedata points as expected by a user. Consequently, users of conventionaltechniques were often forced to manually correct the curve, which couldbe frustrating and inefficient.

SUMMARY

Parametric curve fitting is described that involves use of maximumcurvature techniques. In one or more implementations, a curve is fit toa segment of a plurality of data points that includes a first data pointdisposed between second and third data points by setting a point ofmaximum curvature for the segment of the curve at the first data point.A result of the fitting is then output by the computing device.

In one or more implementations, a curve is output in a user interface ofa computing device and responsive to receipt of an input to select adata point of the curve via the user interface, the data point is set asa point of maximum curvature for a segment of the curve. Responsive toan input defining subsequent movement of the data point in the userinterface, the segment of the curve is fit such that the data pointremains the point of maximum curvature for the segment of the curve.

In one or more implementations, a system includes at least one moduleimplemented at least partially in hardware. The at least one module isconfigured to perform operations that include fitting a curve to aplurality of segments of a plurality of data points, each of thesegments including a first data point disposed between second and thirddata points, the first data point set as a point of maximum curvaturefor the segment. Responsive to receipt of an input to select a new datapoint along the curve displayed via the user interface, the new datapoint is set as a point of maximum curvature for a corresponding segmentof the curve. Responsive to an input defining subsequent movement of thenew data point in the user interface, the corresponding segment of thecurve is fit such that the new data point remains the point of maximumcurvature for the corresponding segment of the curve.

This Summary introduces a selection of concepts in a simplified formthat are further described below in the Detailed Description. As such,this Summary is not intended to identify essential features of theclaimed subject matter, nor is it intended to be used as an aid indetermining the scope of the claimed subject matter.

BRIEF DESCRIPTION OF THE DRAWINGS

The detailed description is described with reference to the accompanyingfigures. In the figures, the left-most digit(s) of a reference numberidentifies the figure in which the reference number first appears. Theuse of the same reference numbers in different instances in thedescription and the figures may indicate similar or identical items.Entities represented in the figures may be indicative of one or moreentities and thus reference may be made interchangeably to single orplural forms of the entities in the discussion.

FIG. 1 is an illustration of an environment in an example implementationthat is operable to employ techniques described herein.

FIG. 2 depicts a system in an example implementation in which a curve isfit to a plurality of data points based at least in part on maximumcurvature.

FIG. 3 depicts a system in an example implementation in which movementof an existing data point is shown as modifying a segment of a curve.

FIG. 4 depicts a system in an example implementation in which additionand subsequent movement of a new data point is shown as definingmodifying a corresponding new segment of a curve.

FIGS. 5 and 6 are exemplary implementations showing examples of curvescreated using conventional techniques and maximum curvature techniquesdescribed herein.

FIG. 7 is an example regarding three curves as part of a compositequadratic Bezier curve.

FIG. 8 is an example regarding two curves as part of a compositequadratic Bezier curve.

FIG. 9 is an example regarding two curves as part of a compositequadratic Bezier curve.

FIG. 10 is an example of a closed curve.

FIG. 11 is an example of a quadratic kCurve Algorithm.

FIG. 12 is a flow diagram depicting a procedure in an exampleimplementation in which a curve is fit and modified by leveragingmaximum curvature techniques.

FIG. 13 illustrates an example system including various components of anexample device that can be implemented as any type of computing deviceas described and/or utilize with reference to FIGS. 1-12 to implementembodiments of the techniques described herein.

DETAILED DESCRIPTION Overview

Conventional techniques that are utilized to fit curves to data points,while providing a high degree of mathematical control, may lacksufficient intuitive interaction and ease of use. Further, theseconventional techniques could also result in a curve that departed froma user's expectations, such as due to inclusion of peaks, loops, and soon that do not appear to follow the rest of the data points.

Parametric curve fitting techniques that employ maximum curvature aredescribed. In one or more implementations, a curve is fit to data pointshaving intervals that include at least three data points. For eachinterval, a central data point of the interval that is disposed betweenat least two other data points is set as a point of maximum curvaturefor that interval. Additionally, by using parametric techniques, eachpoint on the curve may be direction evaluated using a simple expression,e.g., position, tangent, normal, curvature, and so on using a close formexpression. In this way, the curve fit to the data points may complywith a user's expectations by avoiding inclusion of peaks and loops thatdo not seem to follow the rest of the data points.

Additionally, these techniques may be configured to support intuitiveinteraction on the part of a user with the curve. For example, the usermay make changes to the curve by selecting a point along the curve. Theselected point is then set as a new point of maximum curvature for thatinterval, which may then be moved (e.g., via gesture or cursor controldevice) as desired in an intuitive manner. Thus, a user may make changesto a curve as desired by simply grabbing desired points along the curveand moving them. A variety of other functionality may also be supported,further discussion of which may be found in relation to the followingsections.

In the following discussion, an example environment is first describedthat may employ the techniques described herein. Example procedures arethen described which may be performed in the example environment as wellas other environments. Consequently, performance of the exampleprocedures is not limited to the example environment and the exampleenvironment is not limited to performance of the example procedures.

Example Environment

FIG. 1 is an illustration of an environment 100 in an exampleimplementation that is operable to employ techniques described herein.The illustrated environment 100 includes a computing device 102, whichmay be configured in a variety of ways.

The computing device 102, for instance, may be configured as a desktopcomputer, a laptop computer, a mobile device (e.g., assuming a handheldconfiguration such as a tablet or mobile phone), and so forth. Forexample, as illustrated the computing device 102 is configured in amobile configuration as a tablet that includes a display device 104having touchscreen functionality that is configured to recognize touchinputs, such as those from a user's hand 106. Thus, the computing device102 may range from full resource devices with substantial memory andprocessor resources (e.g., personal computers, game consoles) to alow-resource device with limited memory and/or processing resources(e.g., mobile devices). Additionally, although a single computing device102 is shown, the computing device 102 may be representative of aplurality of different devices, such as multiple servers utilized by abusiness to perform operations “over the cloud” as further described inrelation to FIG. 11.

The computing device 102 is illustrated as including a curve fittingmodule 108. The curve fitting module 108 is representative offunctionality relating to the fitting of a curve to a plurality of datapoints 110 as well as functionality relating to interaction (e.g.,modifying) the curve. Although illustrated as implemented on thecomputing device 102, the curve fitting module 108 may be implemented ina variety of ways, such as remotely via a web service of a serviceprovider that is accessible “on the cloud” via the network 112,distributed between the service provider and the computing device 102,and so on.

In the illustrated example, a plurality of data points 116, 118, 120,122 are illustrated as being input via a gesture that is detected viatouchscreen functionality of the display device 104, such as through useof one or more capacitive sensors. This may be performed as part of avariety of different functionality, such as to specify a path via whichan object is to be animated, used to specify a seam for imageprocessing, and so on. Other examples are also contemplated, such asdata points 110 received from a spreadsheet, sensor readings,presentation software, and so on.

The curve fitting module 108, upon receipt of the data points 116-122,may then fit a curve 124 automatically and without user interventionbased on the data points 116-122. This may be performed in a variety ofways, such as to leverage a maximum curvature technique such that thedata points 118, 120 disposed between end points (e.g., data points 116,122) are set at a maximum curvature for an interval that includes thedata point, further discussion of which may be found in relation to FIG.2. Additionally, the curve fitting module 108 may support techniques tointeract with the curve 124 in an intuitive manner, such as to modifythe curve, further discussion of which may be found in relation to FIGS.3 and 4.

FIG. 2 depicts a system 200 in an example implementation in which acurve is fit to a plurality of data points based at least in part onmaximum curvature. The system 200 includes an illustration of the userinterface 114 of FIG. 1 showing first and second stages 202, 204 ofautomatic curve fitting.

At the first stage 202, a cursor control device is utilized tomanipulate a cursor to specify data points 206, 208, 210 in a userinterface. The data points 206-210 in the first stage 202 define aninterval of a curve in that data point 208 is disposed between at leasttwo other data points 206, 210. In response, the curve fitting module108 fits a curve that connects the data points 206, 208, 210 insuccession to form a single continuous line.

A variety of techniques may be utilized to fit a curve. In theillustrated example, for instance, the technique involves maximumcurvature such that a data point is set at a point of maximum curvatureof the curve for that interval. For example, curvature may be thought ofas one over the radius of a circle that could be fit tangent to thatlocation. Therefore, curvature at data point 208 of a segment of a curvethat includes data points 206, 208, 210 is at a maximum at data point208 following a maximum curvature technique. Thus, the slope of atangent of the curve increases from data point 206 to data point 208 andthen decreases from data point 208 to data point 210 such that datapoint 208 is at the maximum.

At the second stage 204, additional data points 212, 214 are specifiedby a user through use of a cursor control device to manipulate a cursorin a user interface 114. In this example, each successive data point(e.g., 212, 214) is used to define a new interval of the curve by thecurve fitting module 108. Data point 212 once added, for instance,defines an interval in which data point 210 is disposed between datapoints 208, 212. Therefore, a curve is fit for this segment in whichdata point 210 is at a point of maximum curvature for the segment. Oncedata point 214 is added, data point 212 is set at a point of maximumcurvature for a segment that includes data points 210, 212, 214.

Thus, the curve at the second stage 204 may be implemented to include afirst interval that includes data points 206-210, a second interval thatincludes data points 208-212, and a third interval that includes datapoints 210-214. Additional examples are also contemplated, such as acomposite curve example in which the end of the one segment is the startof another segment but do not overlap.

Data points that are used to connect one segment of a curve with anothersegment may be considered a join point. In one or more implementations,slopes of segments that include the join point (e.g., data point 210 fora segment including data points 206-210 with a segment including datapoints 210-214) are generally continuous, one to another. For example,the addition of data point 214 to define an interval involving datapoints 210, 212, 214 may also cause an adjustment in slopes of a portionof a segment between data points 208, 210. In this way, the segments ofthe curve may also correspond to expectations by promoting consistencybetween the segments. Further discussion of this functionality may befound in relation to the Implementation Example section below. Althoughuse of a cursor control device to specify the data points was describedin this example, other examples are also contemplated as previouslydescribed. The curve fitting module 108 may also support techniques tomodify the curve, an example of which is described as follows and shownin a corresponding figure.

FIG. 3 depicts a system 300 in an example implementation in whichmovement of an existing data point is shown as modifying a segment of acurve. The system 300 includes an illustration of the user interface 114of FIG. 1 showing first, second, and third stages 302, 304, 306 ofautomatic curve fitting and modification to a curve. At the first stage302, a cursor is used to select a data point 308 disposed between datapoints 310, 312. The data point 308 is at a point of maximum curvaturefor an interval that includes data points 308, 310, 312.

Once selected, the cursor is used to move the data point 310 upward inthe user interface 114 as illustrated through use of an arrow shown inphantom. A result of this movement is shown in the second stage 304. Asillustrated, the segment of the curve is recalculated such that datapoint 308 remains at a point of maximum curvature for the segment as thefitting of the curve continues for the segment. Further, the end pointsof the segment (e.g., data points 310, 312) are constrained frommovement during the movement of the data point 308. Although the datapoints 310, 312 are not moved, the curve fitting module may stillconserve general consistency of the slopes of curvature of adjoiningsegments due to the configuration of the data points 310, 312 as joinpoints with the adjoining segments of the curve.

In the second stage 304, the cursor is used to continue movement of thedata point 310 upward in the user interface 114 as also illustratedthrough use of an arrow shown in phantom. A result of this movement isshown in the third stage 306. As illustrated, the segment of the curvecontinues to be recalculated such that data point 308 remains at a pointof maximum curvature for the segment as the fitting of the curvecontinues for the segment. Further, fitting of adjacent intervals mayalso be configured to maintain continuity of slopes between theintervals, even though the end points (e.g., data points 310, 312) areconstrained from movement during the movement of the data point 308 inthis example. In this example, an existing data point was moved. Otherexamples are also contemplated, such as to add data points to facilitatemodification to a curve, an example of which is described as follows andshown in a corresponding figure.

FIG. 4 depicts a system 400 in an example implementation in whichaddition and subsequent movement of a new data point is shown asdefining modifying a corresponding new segment of a curve. The system400 includes an illustration of the user interface 114 of FIG. 1 showingfirst, second, and third stages 402, 404, 406 of automatic curve fittingand modification to a curve. At the first stage 402, a cursor is used tospecify a new data point 408 disposed between data points 310, 312 thatwas not previously included as part of the curve. The data point 408 isat a point of maximum curvature for an interval that includes datapoints 308, 408, 312.

Once selected, the cursor is used to move the data point 408 upward inthe user interface 114 as illustrated through use of an arrow shown inphantom. A result of this movement is shown in the second stage 404. Asillustrated, the segment of the curve is recalculated such that datapoint 408 remains at a point of maximum curvature for the segment as thefitting of the curve continues for the segment. Further, the end pointsof the segment (e.g., data points 308, 312) are constrained from movingduring the movement of the data point 408 as before. Although the datapoints 308, 312 are not moved, the curve fitting module may stillconserve general consistency of the slopes of curvature of adjoiningsegment due to the configuration of the data points 308, 312 as joinpoints with the adjoining segments of the curve.

In the third stage 406, the cursor is used to move the data point 408downward in the user interface 114 as also illustrated through use of anarrow shown in phantom. As illustrated, the segment of the curvecontinues to be recalculated such that data point 408 remains at a pointof maximum curvature for the segment as the fitting of the curvecontinues for the segment. Further, fitting of adjacent intervals mayalso be configured to maintain continuity of slopes between theintervals.

Thus, techniques are presented to enable intuitive control of acomposite curve. A user may “grab” any point on the curve and moves it,with each such point ensured to lie at a location of local (m)aximum(c)urvature. Each such point of maximum curvature is then fixed andconstrained not to move, unless it is specifically moved. This enablescreation and adjustment complex curves in fewer steps and with moreintuitive gestures than has been previously the norm.

FIGS. 5 and 6 are exemplary implementations 500, 600 showing examples ofcurves created using conventional techniques and maximum curvaturetechniques described herein. As shown in FIG. 5, for instance, a curve502 is fit using maximum curvature techniques that follows expectationsof a user when fitting the curve. Another curve 504 fit usingconventional techniques, however, includes peaks that depart from auser's expectations. Likewise, a curve 602 using maximum curvaturetechniques of FIG. 6 generally follows expectations whereas a curve 604using conventional techniques introduces an unexpected loop.

Further, conventional techniques that were employed to interact with acurve typically involved control points that were arranged “off” thecurve, such as controls points to adjust a tangent. Accordingly, thechange in the curve using conventional techniques is an indirect resultof changing these control points. Thus, conventional techniques were notsufficiently intuitive and required more than the minimum number of useroperations to achieve simple goals of creating and editing the curves.

However, in the techniques described herein a user is presented with acurve, which could be a straight or curved line segment. The user maygrab hold of any location on the curve and move it. The curve isrecalculated to follow the movement, with the location being a datapoint that remains at maximum curvature. For example, to move a bump onthe curve, a maximum curvature marker is placed at the bump and moved.Each such gesture produces a maximum curvature marker, which thesemarkers remaining fixed unless specifically targeted to move. Theexperience is one of simply moving points directly on the curve andstability is ensured because the constrained points do not move.

Implementation Example Using Bezier Curves

A composite curve may be described as a series of quadratic Bezier curvesegments. The series may be continuous in that the end of one segment isthe start of the next one, and so on. The two endpoints of thiscomposite curve are constraint points, which means that the pointsremain fixed unless moved by a user.

Each quadratic Bezier curve has a point of maximum curvature, it may lieat an endpoint of the curve segment or in-between curve segments. If thecurve is straight, this maximum curvature point can by default beconsidered to lie at the midpoint between the two endpoints or anywherein-between. Each point manipulated by a user becomes a constrainedmaximum curvature point. The mathematical problem reduces to one ofdetermining the parameters for a series of quadratic Bezier curvesconstrained so that the endpoints are given and the maximum curvaturepoints are given. The following provides a solution to this problemwhich keeps the slopes at the join points continuous and ensures thatevery indicated maximum curvature point does indeed lie at a place ofmaximum local curvature on the composite curve. Further, the join pointsmay be configured such that subsequent movement of a segment of thecurve is greater than movement performed for another segment that isadjacent to the segment. In this way, movement of a new data point(maximum curvature point) in one segment, causes decreasing movement ofthe curve segments farther away from this segment.

The solution may be cast in the form of a set of coupled nonlinearequations for the unknown Bezier control points given the specified twooverall endpoints and the specified maximum curvature points. For “N”maximum curvature points there are “N” curve segments and the solutioninvolves inverting an “N×N” matrix. A variety of different examplesinvolving different Bezier curves is described as follows.

Single Quadratic Bezier Curve

Consider a quadratic Bezier curve of the form as follows:r(t)=(1−t)² r ₀+2t(1−t)r _(m) +t ² r ₁  1)Bold characters indicate two-dimensional vectors. In the aboveexpression, “r(t)” specifies the coordinate trajectory of the curve asparameterized by the time parameters “t” which varies in value between“0” and “1”. The value “r₀” is the “t=0” endpoint of the curve, “r₁” isthe “t=1” endpoint of the curve, and “r_(m)” is the (m)iddle controlpoint which determines the velocity vector of the curve trajectory asfollows:

$\begin{matrix}{{\frac{\mathbb{d}{r(t)}}{\mathbb{d}t} \equiv {v(t)}} = {{\left( {1 - t} \right)v_{0}} + {t\; v_{1}}}} & \left. 2 \right)\end{matrix}$in terms of the velocities at the two endpoints,v ₀=2(r _(m) −r ₀)=2r _(m,0)  3)v ₁=2(r ₁ −r _(m))=2r _(1,m)  4)In this discussion, subscript notation is used as follows:r _(a,b) =r _(a) −r _(b).An equivalent presentation of the velocity is given in terms of theconstant acceleration, :a₀,” along the curve

$\begin{matrix}{{v(t)} \equiv {v_{0} + {ta}_{0}}} & \left. 5 \right) \\{a_{0} = {v_{1} - {v_{0}\left( {{\frac{\mathbb{d}^{2}{r(t)}}{\mathbb{d}t^{2}} \equiv {a(t)}} = a_{0}} \right)}}} & \left. 6 \right)\end{matrix}$

The completeness property of Bernstein polynomial coefficients in theformula for the Bezier coordinate may be leveraged as follows:1=(1−t)²+2t(1−t)+t ²  7)to cast the trajectory in the alternate formr(t)=r ₀+2t(1−t)r _(m,0) +t ² r _(1,0)  8)which uses the difference vectors,r _(m,0) =r _(m) −r ₀  9)andr _(1,0) =r ₁ −r ₀.  10)Yet another variation of the trajectory formula isr(t)=r ₀ +t[(1−t)v ₀ +t(v ₀ +v ₁)/2];  11)This is equivalent to the equation of motion of an object under constantacceleration as follows:

$\begin{matrix}{{r(t)} = {r_{0} + {v_{0}t} + {\frac{1}{2}a_{0}t^{2}}}} & \left. 12 \right)\end{matrix}$

Maximum Curvature Time

A point “r_(c)” may be specified that lies along the curve and for whichthe curvature is a maximum. Moving this (m)aximum (c)urvature pointprovides an intuitive way to interact with and reshape the curve asdescribed above.

For a general parametric curve, the curvature vector “κ(t)” of any pointalong the trajectory is, by definition, the rate of change per unit arclength, “ds,” of the curve's tangent vector,

${\;^{''}{n(t)} = \frac{v(t)}{v(t)}},^{''}$where “v (t)” (not bold) is the speed, the magnitude of the vectorvelocity, “v (t).”

$\begin{matrix}{{\kappa(t)} = {{\frac{d}{ds}{n(t)}} = {\frac{\frac{\mathbb{d}}{\mathbb{d}t}\left( \frac{v(t)}{v(t)} \right)}{\frac{\mathbb{d}s}{\mathbb{d}t}} = \frac{{v(t)}x\;{a(t)}}{{v(t)}^{3}}}}} & \left. 13 \right)\end{matrix}$

The signed magnitude of this vector is the signed scalar curvature attime t. Since we are only considering two-dimensional curves the crossproduct “v(t)×a(t)” is directed into the unused third dimension, whichcan be specified by the unit vector, “e₃.” Accordingly the magnitude ofthe curvature vector is the projection (dot product) of the curvaturevector onto the third dimension (z axis, if the curve is specified inthe x,y plane).

$\begin{matrix}{{\kappa(t)} = \frac{e_{3} \cdot \left( {{v(t)}x\;{a(t)}} \right)}{{v(t)}^{3}}} & \left. 14 \right)\end{matrix}$

Specializing from a general two-dimensional curve to a quadratic Beziercurve provides the simplification that the numerator in the curvatureformula is constant, independent of time, “t,”v(t)×a(t)=v(t)×a ₀ =v ₀ ×a ₀  15)and the velocity vector is linear in time. This leads to the formula forthe curvature of a quadratic Bezier curve:

$\begin{matrix}{{\kappa(t)} = \frac{v_{0}x\; a_{0}}{\left( \left( {v_{0} + {t\; a_{0}}} \right)^{2} \right)^{3/2}}} & \left. 16 \right)\end{matrix}$

The point on the curve, and hence its corresponding time parameter, forwhich this curvature is maximum is then found. This is equivalent tominimizing the denominator in the above formula. It is sufficient tominimize the speed, or equivalently, it's square. The time, “tc,” whichdetermines the maximum curvature point is then found from:0=d/dt(v ₀ +ta ₀)²:  17)0=d/dt(v ₀ ²+2t v ₀ ·a ₀ +a ₀ ² t ²)=2(v ₀ ·a ₀ +a ₀ ² t)  18)

The maximum curvature time parameter is then determined simply as

$\begin{matrix}{t_{c} = {\frac{{- v_{0}} \cdot a_{0}}{a_{0}^{2}}.}} & \left. 19 \right)\end{matrix}$

The corresponding maximum curvature point is then found by using thistime in the trajectory formula.r _(c)=(1−t _(c))² r ₀+2t _(c)(1−t _(c))r _(m) +t _(c) ² r ₁Hence, if the determining curve parameters “r₀, r_(m), and r₁” arespecified, then this maximum curvature point may be found.

However, rather than specifying a tangent control point “r_(m),” themaximum curvature point may be specified, and from this the Bezierparameters may be determined which place this MC point at the specifiedlocation. This leads to a cubic equation to solve for the MC time,“t_(c).”

Specified Maximum Curvature Point; Single Curve Segment

To restate the problem under current consideration, a quadratic Beziercurve is provided with fixed endpoints, “r₀” and “r₁” along with themaximum curvature coordinate, “r_(c).” The standard middle controlpoint, “r_(m)” may then be found, which leads to this state.

This is accomplished by combining together equations 19) and 20) alongwith the definitions 3), 4) and 6):

$\begin{matrix}{\mspace{20mu}{r_{m} = \frac{r_{c} - {\left( {1 - t_{c}} \right)^{2}r_{0}} - {r_{2}^{2}r_{1}}}{2{t_{c}\left( {1 - t_{c}} \right)}}}} & \left. 21 \right) \\{\mspace{20mu}{v_{0} = {{2\left( {r_{m} - r_{0}} \right)} = {\frac{r_{c} - {\left( {1 - t_{c}^{2}} \right)r_{0}} - {t_{c}^{2}r_{1}}}{t_{c}\left( {1 - t_{c}} \right)} = \frac{r_{c,0} - {t_{c}^{2}r_{1,0}}}{t_{c}\left( {1 - t_{c}} \right)}}}}} & \left. 22 \right) \\{v_{1} = {{{- 2}\left( {r_{m} - r_{1}} \right)} = {{- \frac{r_{c} - {\left( {1 - t_{c}} \right)^{2}r_{0}} - {\left( {1 - \left( {1 - t_{c}} \right)^{2}} \right)r_{1}}}{t_{c}\left( {1 - t_{c}} \right)}} = {- \frac{r_{c,1} + {\left( {1 - t_{c}} \right)^{2}r_{1,0}}}{t_{c}\left( {1 - t_{c}} \right)}}}}} & \left. 23 \right) \\{\mspace{20mu}{a_{0} = {{v_{1} - v_{0}} = {{- \frac{r_{c,1} + r_{c,0} + {\left( {1 - {2t_{c}}} \right)r_{1,0}}}{t_{c}\left( {1 - t_{c}} \right)}} = {{- 2}\frac{\;{r_{c,0} - {t_{c}r_{1,0}}}}{t_{c}\left( {1 - t_{c}} \right)}}}}}} & \left. 24 \right)\end{matrix}$

Equations 19), 22) and 24) lead to the equation for the maximumcurvature time, “t_(c).”

$\begin{matrix}{t_{c} = {\frac{{- v_{0}} \cdot a_{0}}{a_{0}^{2}} = {\frac{1}{2}\frac{\left( {r_{c,0} - {t_{c}^{2}r_{1,0}}} \right) \cdot \left( {r_{c,0} - {t_{c}r_{1,0}}} \right)}{\left( {r_{c,0} - {t_{c}r_{1,0}}} \right)^{2}}}}} & \left. 25 \right)\end{matrix}$

This is a cubic equation which can be solved for “t_(c).”r _(1,0) ² t _(c) ³−3r _(c,0) ·r _(1,0) t _(c) ²+(2r _(c,0) ² +r _(c,0)·r _(1,0))t _(c) −r _(c,0) ²=0  26)

To summarize, given the curve endpoints, “r₀” and “r₁,” along with thespecified maximum curvature point, “r_(c)” cubic equation 26 is solvedfor the maximum curvature time, “t_(c),” and this time is used inequation 21 to determine the quadratic Bezier curve standard middlecontrol point, “r_(m).”

An alternate form of the cubic equation 26 is provided by shifting thetime so that it is expressed relative to the halftime value ½.

$\begin{matrix}{{\left( {t_{c} - {1/2}} \right)^{3} + {\frac{3}{2}\left( {t_{c} - \frac{1}{2}} \right)^{2}{r_{1,0} \cdot \frac{\left( {r_{1,c} - r_{c,0}} \right)}{r_{1,0}^{2}}}} + {\left( {t_{c} - \frac{1}{2}} \right)\left( {\frac{3}{4} - {2\frac{\;{r_{1,c} \cdot r_{c,0}}}{r_{1,0}^{2}}}} \right)} + {\frac{1}{8}{r_{1,0} \cdot \frac{\left( {r_{1,c} - r_{c,0}} \right)}{r_{1,0}^{2}}}}} = 0} & \left. 27 \right)\end{matrix}$

The solution of the cubic equation is relatively straightforward.However, an approximate solution may suffice. In particular, a singleiteration of Halley's method for root finding gives a goodapproximation:

$\begin{matrix}{{t_{c} \cong {{1/2} - \frac{1}{{p^{\prime}/p} - {{1/2}{p^{''}/p^{\prime}}}}}}{with}} & \left. 27 \right) \\{{p^{''} = {3{r_{1,0} \cdot \frac{\left( {r_{1,c} - r_{c,0}} \right)}{r_{1,0}^{2}}}}}{p^{\prime} = {\frac{3}{4} - {2\frac{r_{1,c} \cdot r_{c,0}}{r_{1,0}^{2}}}}}{p = {p^{''}/24}}} & \left. 28 \right)\end{matrix}$

The solution may be expressed alternately in terms of the parameterβ_(1,0)=[3r _(1,0) ²−8r _(1,c0) ·r _(c0,0) ]/[r _(1,0)·(r _(1,c0) −r_(c0,0))]  29)as

$\begin{matrix}{t_{c} \cong {{1/2} - {{1/2}\;\frac{1}{\left( {\beta_{1,0} - {3/\beta_{1,0}}} \right)}}}} & \left. 30 \right)\end{matrix}$

Composite Quadratic Bezier Curves; Three Curves

In the following, three quadratic Bezier curves are stitched togetherwith consideration given to adjusting the maximum curvature point forthe middle curve. The following notation is used to shift the origin ofthe time parameter for each curve:t ₀ ≡tt ₁ ≡t−1t ₂ ≡t−2

The three curves may be expressed asr ₀(t)=(1−t ₀)² r ₀+2t ₀(1−t ₀)r _(m) +t ₀ ² r ¹r ₁(t)=(1−t ₁)² r ₁+2t ₁(1−t ₁)r _(m′) +t ₁ ² r ₂r ₂(t)=(1−t ₂)² r ₂+2t ₂(1−t ₂)r _(m″) +t ₂ ² r ₃  31)

A schematic of the curves is shown in the example 700 of FIG. 7 in whichthe endpoints, represented by solid squares, are fixed. The middlecontrol points are shown as the symbol “†,” and the intermediateendpoints, which are free to move around, as dotted circles.

The curves are continuous by design. The imposition of continuity of thetangent vectors at the join points, “r₁” and “r₂,” is enforced bysettingr _(m′) =r ₁+λ₁(r ₁ −r _(m))  32)andr _(m″) =r ₂+λ₂(r ₂ −r _(m′))=r ₂+λ₂(r _(2,1)−λ₁ r _(1,m))  33)

The curves can then be expressed asr ₀(t)=r ₀+2t ₀(1−t ₀)r _(m,0) +t ₀ ² r _(1,0)r ₁(t)=r ₁+2t ₁(1−t ₁)λ₁ r _(1,m) +t ₁ ² r _(2,1)r ₂(t)=r ₂−2t ₂(1−t ₂)λ₂(r ₁+λ₁ r _(1,m))+t ₂ ² r _(3,2)  34)

The parameters “λ₁” and “λ₂” may be used to scale the magnitudes of thetangent vectors at the points “r₁” and “r₂,” respectively. An assumptionmay be made that the two endpoints r₀ and r₃ are fixed. In this form itis clear that the unfixed variables are “r₁, r₂, r_(m)” and the scalingparameters are “λ₁” and “λ₂.” This is a total of eight unknowns sincethe vectors are two-dimensional.

Three maximum curvature points may be specified, which one on each ofthe three curves to control the curves. This provides three constraintequations, each of which is two-dimensional. The maximum curvaturepoints are found by setting the time parameters equal to thecorresponding maximum curvature times:r _(c) ₀ =r ₀+2t _(c) ₀ (1−t _(c) ₀ )r _(m,0) +t _(c) ₀ ² r _(1,0)r _(c) ₁ =r ₁+2t _(c) ₁ (1−t _(c) ₁ )λ₁ r _(1,m) +t _(c) ₁ ² r _(2,1)r _(c) ₂ =r ₂−2t _(c) ₂ (1−t _(c) ₂ )λ₂(r ₁+λ₁ r _(1,m))+t _(c) ₂ ² r_(3,2)  35)

These 6 constraints suffice to determine “r₁, r₂ and r_(m)” for thespecified scaling constants. The solution of the constraint problem ishowever nonlinear since the maximum curvature times depend upon thevectors that are being found. The cubic equations for the maximumcurvature time parameters are:r _(1,0) ² t _(c) ₀ ³−3r _(c0,0) ·r _(1,0) t _(c) ₀ ²+(2r _(c0,0) ² +r_(c0,0) ·r _(1,0))t _(c) ₀ −r _(c0,0) ²=0r _(2,1) ² t _(c) ₁ ³−3r _(c1,1) ·r _(2,1) t _(c) ₁ ²+(2r _(c1,1) ² +r_(c1,1) ·r _(2,1))t _(c) ₁ −r _(c1,1) ²=0r _(3,2) ² t _(c) ₂ ³−3r _(c2,2) ·r _(3,2) t _(c) ₂ ²+(2r _(c2,2) ² +r_(c2,2) ·r _(3,2))t _(c) ₂ −T _(c) ₂ −r _(c2,2) ²=0   36)

The challenge is then to solve the coupled nonlinear equations 35) and36) for the unknown coordinates, r₁, r₂, r_(m), given the constrainedendpoints and maximum curvature point and fixed tangent velocity scalingparameters.

The set of equations 34) may be replaced with the approximate cubicsolutions:

$\begin{matrix}{{t_{c_{0}} \cong {{1/2} - \frac{1}{\begin{matrix}{{{2\left\lbrack {{3r_{1,0}^{2}} - {8{r_{1,{c\; 0}} \cdot r_{{c\; 0},0}}}} \right\rbrack}/\left\lbrack {r_{1,0} \cdot \left( {r_{1,{c\; 0}} - r_{{c\; 0},0}} \right)} \right\rbrack} -} \\{{6\left\lbrack {r_{1,0} \cdot \left( {r_{1,{c\; 0}} - r_{{c\; 0},0}} \right)} \right\rbrack}/\left\lbrack {{3r_{1,0}^{2}} - {8{r_{1,{c\; 0}} \cdot r_{{c\; 0},0}}}} \right\rbrack}\end{matrix}}}}{t_{c_{1}} \cong {{1/2} - \frac{1}{\begin{matrix}{{{2\left\lbrack {{3r_{2,1}^{2}} - {8{r_{2,{c\; 1}} \cdot r_{{c\; 1},1}}}} \right\rbrack}/\left\lbrack {r_{2,1} \cdot \left( {r_{2,{c\; 1}} - r_{{c\; 1},1}} \right)} \right\rbrack} -} \\{{6\left\lbrack {r_{2,1} \cdot \left( {r_{2,{c\; 1}} - r_{{c\; 1},1}} \right)} \right\rbrack}/\left\lbrack {{3r_{2,1}^{2}} - {8{r_{2,{c\; 1}} \cdot r_{{c\; 1},1}}}} \right\rbrack}\end{matrix}}}}{t_{c_{2}} \cong {{1/2} - \frac{1}{\begin{matrix}{{{2\left\lbrack {{3r_{3,2}^{2}} - {8{r_{3,{c\; 2}} \cdot r_{{c\; 2},2}}}} \right\rbrack}/\left\lbrack {r_{3,2} \cdot \left( {r_{3,{c\; 2}} - r_{{c\; 2},2}} \right)} \right\rbrack} -} \\{{6\left\lbrack {r_{3,2} \cdot \left( {r_{3,{c\; 2}} - r_{{c\; 2},2}} \right)} \right\rbrack}/\left\lbrack {{3r_{3,2}^{2}} - {8{r_{3,{c\; 2}} \cdot r_{{c\; 2},2}}}} \right\rbrack}\end{matrix}}}}} & \left. 37 \right)\end{matrix}$This can be restated, following 29) and 30) as

$\begin{matrix}{{t_{c_{0}} \cong {{1/2} - {{1/2}\;\frac{1}{\left( {\beta_{1,0} - {3/\beta_{1,0}}} \right)}}}}{t_{c_{1}} \cong {{1/2} - {{1/2}\;\frac{1}{\left( {\beta_{2,1} - {3/\beta_{2,1}}} \right)}}}}{t_{c_{2}} \cong {{1/2} - {{1/2}\;\frac{1}{\left( {\beta_{3,2} - {3/\beta_{3,2}}} \right)}}}}} & \left. 38 \right)\end{matrix}$whereβ_(1,0)=[3r _(1,0) ²−8r _(1,c) ₀ ·r _(c) ₀ _(,0) ]/[r _(1,0)·(r _(1,c) ₀−r _(c) ₀ _(,0))]β_(2,1)=[3r _(2,1) ²−8r _(2,c) ₁ ·r _(c) ₁ _(,1) ]/[r _(2,1)·(r _(2,c) ₁−r _(c) ₁ _(,1))]β_(3,2)=[3r _(3,2) ²−8r _(3,c) ₂ ·r _(c) ₂ _(,2) ]/[r _(3,2)·(r _(3,c) ₂−r _(c) ₂ _(,2))]  39)

The solution to these coupled nonlinear equations may begin by solvingthe first of equations 35) for “r_(m,0).”

$\begin{matrix}{r_{m,0} = \frac{r_{c_{0},0} - {t_{c_{0}}^{2}r_{1,0}}}{2{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}}} & \left. 40 \right)\end{matrix}$

The addition of the first endpoint “r₀” results in the expression of thetangent vector “r_(m)” as

$\begin{matrix}{r_{m} = {{r_{m,0} + r_{0}} = {\frac{r_{c_{0},0} - t_{c_{0}}^{2} + {2{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}r_{0}}}{2{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}} = \frac{r_{c_{0},0} - {\left( {1 - t_{c_{0}}} \right)^{2}r_{1,0}}}{2{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}}}}} & \left. 41 \right)\end{matrix}$

This implies

$\begin{matrix}{r_{1,m} = \frac{r_{1c_{0}} - {\left( {1 - t_{c_{0}}} \right)^{2}r_{1,0}}}{2{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}}} & \left. 41 \right)\end{matrix}$

Substituting this in the second of equations 35) leads to

$r_{c_{1}} = {r_{1} + {2{t_{c_{1}}\left( {1 - t_{c_{1}}} \right)}\lambda_{1}\frac{r_{1,c_{0}} - {\left( {1 - t_{c_{0}}} \right)^{2}r_{1,0}}}{2{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}}} + {t_{c_{1}}^{2}r_{2,1}}}$With the definition

$\begin{matrix}{\kappa_{1} \equiv {\lambda_{1}\frac{t_{c_{1}}\left( {1 - t_{c_{1}}} \right)}{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}}} & \left. 42 \right)\end{matrix}$This can be rewritten asr _(c) ₁ =r ₁+κ₁(r _(1,c) ₀ −(1−t _(c) ₀ )² r _(1,0))+t _(c) ₁ ² r_(2,1)from which “r₁” may be solved as follows:

$r_{1} = \frac{r_{c_{1}} + {\kappa_{1}r_{c_{0}}} - {{\kappa_{1}\left( {1 - t_{c_{0}}} \right)}^{2}r_{0}} - {t_{c_{1}}^{2}r_{2}}}{1 - t_{c_{1}}^{2} + {\kappa_{1}\left( {1 - \left( {1 - t_{c_{0}}} \right)^{2}} \right)}}$

The definition,γ₁=1=t _(c) ₁ ²κ₁(1−(1−t _(c) ₀ )²),  43)produces the formula

$r_{1} = {\frac{1}{\gamma_{1}}\left( {r_{c_{1}} + {\kappa_{1}r_{c_{0}}} - {{\kappa_{1}\left( {1 - t_{c_{0}}} \right)}^{2}r_{0}} - {t_{c_{1}}^{2}r_{2}}} \right)}$And, subtracting “r₀” simplifies this to

$r_{1,0} = {\frac{1}{\gamma_{1}}\left( {r_{c_{1},0} + {\kappa_{1}r_{c_{0},0}} - {t_{c_{1}}^{2}r_{2,0}}} \right)}$orγ₁ r _(1,0) +t _(c) ₁ ² r _(2,0) =r _(c) ₁ _(,0)+κ₁ r _(c) ₀ _(,0)  44)

A complementary equation may be obtained by recognizing the symmetry inthe renumbering of points from right to left instead of left to right.

This producesγ₂ r _(2,3)+(1−t _(c) ₁ )² r _(1,3) =r _(c) ₁ _(,3)+κ₂ r _(c) ₂_(,3)  45)with the definitions

$\begin{matrix}{\kappa_{2} \equiv {\lambda_{2}\frac{t_{c_{1}}\left( {1 - t_{c_{1}}} \right)}{t_{c_{2}}\left( {1 - t_{c_{2}}} \right)}}} & \left. 46 \right)\end{matrix}$andγ₂=1−(1−t _(c) ₁ )²+κ₂(1−t _(c) ₂ ²),  47)

Thus, the two simultaneous vector equations may be obtained for the twovector unknowns, r_(1,0) and r_(2,0).γ₁ r _(1,0) +t _(c) ₁ ² r _(2,0) =r _(c) ₁ _(,0)+κ₁ r _(c) ₀ _(,0)  48)(1−t _(c) ₁ )² r _(1,0)+γ₂ r _(2,0) =r _(c) ₁ _(,3)+κ₂ r _(c) ₂ _(,3)β₃r _(3,0)  48)withβ₃≡γ₂+(1−t _(c) ₁ )²  49)

The solution, obtained by inverting the implied two dimensional matrix,is

$\begin{matrix}{{r_{1,0} = {\left( {{\gamma_{2}v_{1}} - {t_{c_{1}}^{2}v_{2}}} \right)/{determinant}}}{r_{2,0} = {\left( {{{- \left( {1 - t_{c_{1}}} \right)^{2}}v_{1}} + {\gamma_{1}v_{2}}} \right)/{determinant}}}{r_{m,0} = \frac{r_{c_{0,}0} - {t_{c_{0}}^{2}r_{1,0}}}{2{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}}}} & \left. 50 \right)\end{matrix}$withv ₁ =r _(c) ₁ _(,0)+κ₁ r _(c) ₀ _(,0)v ₂ =r _(c) ₁ _(,3)+κ₂ r _(c) ₂ _(,3)+β₃ r _(3,0)  51)determinant=γ₁γ₂−t_(c) ₁ ²(1−t_(c) ₁ )²

The net result is a set of equations for the quadratic Bezier controlpoints given the maximum curvature constraint point times and the twoendpoints “r₀” and “r₃.” The times are in turn determined from thecontrol points. Iterating the two sets several times often converges.

Composite Quadratic Bezier Curves, Two Curves

Having presented the solution for the composite system of three curves,the solution for the simplified problem of a composite of two curves isnow presented. An example 800 of the configuration is shown in FIG. 8,in which the maximum curvature points are designed by open circles.

The control point “r₁” is determined as in the case of three curves by

$\begin{matrix}{r_{1,0} = {\frac{1}{\gamma_{1}}\left( {r_{c_{1},0} + {\kappa_{1}r_{c_{0},0}} - {t_{c_{1}}^{2}r_{2,0}}} \right)}} & \left. 52 \right)\end{matrix}$but now “r₂” in addition to “r₀” is fixed. Similarly the middle controlpoint for the first curve segment is given as

$\begin{matrix}{r_{m,0} = \frac{r_{c_{0},0} - {t_{c_{0}}^{2}r_{1,0}}}{2{t_{c_{0}}\left( {1 - t_{c_{0}}} \right)}}} & \left. 53 \right)\end{matrix}$

The cubic equations for the maximum curvature time parameters are:r _(1,0) ² t _(c) ₀ ³−3r _(c0,0) ·r _(1,0) t _(c) ₀ ²+(2r _(c0,0) ² +r_(c0,0) ·r _(1,0))t _(c) ₀ −r _(c0,0) ²=0r _(2,1) ² t _(c) ₁ ³−3r _(c1,1) ·r _(2,1) t _(c) ₁ ²+(2r _(c1,1) ² +r_(c1,1) ·r _(2,1))t _(c) ₁ −r _(c1,1) ²=0  54)with the approximate solution

$\begin{matrix}{{t_{c_{0}} \cong {{1/2} - {{1/2}\;\frac{1}{\left( {\beta_{1,0} - {3/\beta_{1,0}}} \right)}}}}{t_{c_{1}} \cong {{1/2} - {{1/2}\;\frac{1}{\left( {\beta_{2,1} - {3/\beta_{2,1}}} \right)}}}}} & \left. 55 \right)\end{matrix}$whereβ_(1,0)=[3r _(1,0) ²−8r _(1,c) ₀ ·r _(c) ₀ _(,0) ]/[r _(1,0)·(r _(1,c) ₀−r _(c) ₀ _(,0))]β_(2,1)=[3r _(2,1) ²−8r _(2,c) ₁ ·r _(c) ₁ _(,1) ]/[r _(2,1)·(r _(2,c) ₁−r _(c) ₁ _(,1))]  56)

Composite Quadratic Bezier Curves, Multiple Curves

Having found a solution for the special cases of a composite curveconsisting of one, two and three curve segments, a general case is nowdescribed and a solution presented for an arbitrary number of curves.The problem can be described as follows: two curve endpoints arepresented along with one or more maximum curvature points. A series ofquadratic Bezier curve segments are to be found which begin at one endpoint, end at the other and touch each of the maximum curvatureconstraint points indeed at a point of maximum curvature. An example 900is illustrated in FIG. 9 in which the squares are the specifiedconstraint points and the open circles along with a single tangentcontrol point are to be determined.

For “N” maximum curvature points, there are “N” quadratic Bezier curvesegments and “N” corresponding constraint equations. The quadraticBezier coefficients are defined as:μ_(a) ⁽⁰⁾=(1−t _(c) _(a) )²,μ_(a) ⁽¹⁾=2t _(c) _(a) (1−t _(c) _(a)),μ_(a) ⁽²⁾ =t _(c) _(a) ²  57)This supports writing the following set of coupled equations:

$\begin{matrix}{{{{\mu_{0}^{(0)}r_{0}} + {\mu_{0}^{(1)}r_{m_{0}}} + {\mu_{0}^{(2)}r_{1}}} = r_{c_{0}}}{{{\mu_{1}^{(0)}r_{1}} + {\mu_{1}^{(1)}r_{m_{1}}} + {\mu_{1}^{(2)}r_{2}}} = r_{c_{1}}}{{{\mu_{2}^{(0)}r_{2}} + {\mu_{2}^{(1)}r_{m_{2}}} + {\mu_{2}^{(2)}r_{3}}} = r_{c_{2}}}\ldots{{{\mu_{N - 1}^{(0)}r_{N - 1}} + {\mu_{N - 1}^{(1)}r_{m_{N - 1}}} + {\mu_{N - 1}^{(2)}r_{N}}} = r_{c_{N - 1}}}} & \left. 58 \right)\end{matrix}$

Continuity of the slopes at each endpoint implies that the Bezier middlecontrol points (which determine tangents or velocities at each endpoint)are each determined from the first one. In the following, this issimplified by setting each of the scaling parameters “λ_(n)” to unity:

$\begin{matrix}{{r_{m_{0}} = r_{m}}{r_{m_{1}} = {{2r_{1}} - r_{m}}}{r_{m_{2}} = {{2\left( {r_{2} - r_{1}} \right)} + r_{m}}}{r_{m_{3}} = {{2\left( {r_{3} - r_{2} + r_{1}} \right)} - r_{m}}}\ldots{r_{m_{N}} = {{2{\sum\limits_{n = 1}^{N - 1}{\left( {- 1} \right)^{n - 1}r_{N - n}}}} + {\left( {- 1} \right)^{N - 1}r_{m}}}}} & \left. 59 \right)\end{matrix}$

Note that these follow the recurrence relationr _(m) _(n) =2r _(n) −r _(m) _(n−1) , n=1,2, . . . N  60)

The result of these two sets of equations, 58) and 59), is a matrixequation to be inverted to obtain the “N−1” unknown Bezier endpoints andthe single first-segment middle control point “r_(m).”

The equations for the maximum curvature times are as presented earlierin 36), 37) and 38); there is one equation for each maximum curvatureconstraint point. Representing the set of “N” maximum curvature vectorsasπ_(c) ={r _(c) ₀ −μ₀ ⁽⁰⁾ r ₀ ,r _(c) ₁ ,r _(c) ₂ , . . . ,r _(c) _(N−1)−μ_(N−1) ⁽²⁾ r _(N)}  61)and the set of “N” unknown vectors asπ={r _(m) ,r ₁ ,r ₂ , . . . ,r _(N−1)}  62)the solution is obtained asπ=M ⁻¹π_(c)  63)from the inverse of the “N×N” dimensional matrix “M,” which can bedefined by its non-zero elements:M _(a0)=(−1)^(a)μ_(a) ⁽¹⁾ for a=0,1 . . . ,N−1M _(aa+1)=μ_(a) ⁽²⁾ for a=0,1 . . . ,N−2M _(aa)=μ_(a) ⁽⁰⁾+2μ_(a) ⁽¹⁾ for 0<a<=N−1M _(ab)=(−1)^(a+b)2μ_(a) ⁽¹⁾ for 2<a,1<b<a  64)

A concrete example helps to clarify the solution. Consider the specialcase of a curve containing five maximum curvature constraint points,“r_(c) ₀ , r_(c) ₁ , r_(c) ₂ , r_(c) ₃ , and r_(c) ₄ ,” in addition tothe two endpoints, “r₀” and “r₅.” This curve is composed of fivequadratic Bezier curve segments; in other words, “N=5.”

The five constraint vectors are expressed asπ_(c) ={r _(c) ₀ −μ₀ ⁽⁰⁾ r ₀ ,r _(c) ₁ ,r _(c) ₂ ,r _(c) ₃ ,r _(c) ₄ −μ₄⁽²⁾ r ₅}  65)and the five unknown coordinate vectors areπ={r _(m) ,r ₁ ,r ₂ ,r ₃ ,r ₄}  66)The 5×5 dimensional matrix, “M,” is expressed as

$\begin{matrix}{M = \begin{pmatrix}\mu_{0}^{(1)} & \mu_{0}^{(2)} & 0 & 0 & 0 \\{- \mu_{1}^{(1)}} & {\mu_{1}^{(0)} + {2\mu_{1}^{(1)}}} & \mu_{1}^{(2)} & 0 & 0 \\\mu_{2}^{(1)} & {{- 2}\mu_{2}^{(1)}} & {\mu_{2}^{(0)} + {2\mu_{2}^{(1)}}} & \mu_{2}^{(2)} & 0 \\{- \mu_{3}^{(1)}} & {2\mu_{3}^{(1)}} & {{- 2}\mu_{3}^{(1)}} & {\mu_{3}^{(0)} + {2\mu_{3}^{(1)}}} & \mu_{3}^{(2)} \\\mu_{4}^{(1)} & {{- 2}\mu_{4}^{(1)}} & {2\mu_{4}^{(1)}} & {{- 2}\mu_{4}^{(1)}} & {\mu_{4}^{(0)} + {2\mu_{4}^{(1)}}}\end{pmatrix}} & \left. 67 \right)\end{matrix}$and the solution for the unknown two-dimensional coordinate vectorsrequires inverting this matrix:π=M ⁻¹π_(c)  68)

Convergence

It has been found that the system of three fixed maximum curvaturepoints converges well under the following initialization scheme. First,determine the curve endpoints by averaging the immediate neighbormaximum curvature points. From these, estimate the maximum curvaturetimes. Given these time estimates, calculate the unknown quadraticBezier curve segment endpoints and the tangent control points. This canbe iterated several times. Although use of Bezier curves was describedin this example, it should be readily apparent that a wide variety ofother techniques may also be employed to determine maximum curvaturewithout departing from the spirit and scope thereof.

Composite Quadratic Bezier kCurves

In this section, multiple quadratic Bezier segments are connectedtogether to form continuous kCurves. For “N” maximum curvature pointsthere are “N” quadratic Bezier curve segments and “N” correspondingconstraint equations. To simplify the later equations in this example,the quadratic Bezier coefficients may be defined as follows:α_(i)=(1−t _(c) _(i) )²β_(i)=2t _(c) _(i) (1−t _(c) _(i) )γ_(i) =t _(c) _(i) ²where “t_(ci)” denotes a maximum curvature time for each of the “N”specified maximum curvature locations, each of which is indexed by index“i.”

For each quadratic Bezier curve, the following coupled equations may bewritten:

α₀r₀ + β₀r_(m₀) + γ₀r₁ = r_(c₀) α₁r₁ + β₁r_(m₁) + γ₁r₂ = r_(c₁) …α_(N − 1)r_(N − 1) + β_(N − 1)r_(m_(N − 1)) + γ_(N − 1)r_(N) = r_(c_(N − 1))

“G1” continuity means that tangent direction and magnitude (e.g.,velocities) are continuous at the join point between curve segments.This condition implies that the Bezier end points are halfway betweentheir adjacent middle control points:

r₁ = (r_(m₀) + r_(m₁))/2 r₂ = (r_(m₁) + r_(m₂))/2 …r_(N − 1) = (r_((N − 2)) + r_((N − 1)))/2

The middle control points may be solved to formulate a solution fromwhich solution to the Bezier endpoints may then be inferred. Using theabove expressions, this approach yields, for these control points, arecurrence relation as follows:

${{\frac{1}{2}\gamma_{n}r_{m_{n + 1}}} + {\left( {{\frac{1}{2}\alpha_{n}} + \beta_{n} + {\frac{1}{2}\gamma_{n}}} \right)r_{m_{n}}} + {\frac{1}{2}\alpha_{n}r_{m_{n - 1}}}} = r_{c_{n}}$

The constraint of the known boundary endpoints, “r₀” and “r_(N−1)” leadsto the equations at the boundaries.

${{\frac{1}{2}\gamma_{0}r_{m_{1}\;}} + {\left( {\beta_{0} + {\frac{1}{2}\gamma_{0}}} \right)r_{m_{0}}}} = {r_{c_{0}} - {\alpha_{0}r_{0}}}$and${{\frac{1}{2}\alpha_{N - 1}r_{m_{N - 2}}} + {\left( {\beta_{N - 1} + {\frac{1}{2}\alpha_{N - 1}}} \right)r_{m_{N - 1}}}} = {r_{c_{N - 1}} - {\gamma_{N - 1}r_{N - 1}}}$

Together these yield a matrix equation “Ax_(m)=b” which can be solvedfor the unknown vectors:x _(m) =[r _(m) ₀ ,r _(m) ₁ ,r _(m) ₂ , . . . ,r _(m) _(N−1) ]in terms of the known constraint vectors “b.” The matrix has thefollowing tri-diagonal form:

$A = \begin{bmatrix}{\beta_{0} + \frac{\gamma_{0}}{2}} & \frac{\gamma_{0}}{2} & 0 & 0 & \ldots \\\frac{\alpha_{1}}{2} & {\beta_{1} + \frac{\alpha_{1} + \gamma_{1}}{2}} & \frac{\gamma_{1}}{2} & 0 & \ldots \\0 & \frac{\alpha_{2}}{2} & {\beta_{2} + \frac{\alpha_{2} + \gamma_{2}}{2}} & \frac{\gamma_{2}}{2} & \ldots \\0 & 0 & \frac{\alpha_{3}}{2} & {\beta_{3} + \frac{\alpha_{3} + \gamma_{3}}{2}} & \ddots \\\vdots & \vdots & \vdots & \ddots & \ddots\end{bmatrix}$

For closed curves (e.g., a curve with no endpoints as shown in theexample implementation 1000 of FIG. 10, the matrix A may take on acyclic tri-diagonal form where both the first and last rows of thematrix contain three non-zero elements. This slightly modified matrixcan also be efficiently solved providing a solution for both open andclosed curves.

$A = \begin{bmatrix}{\beta_{0} + \frac{\alpha_{0} + \gamma_{0}}{2}} & \frac{\gamma_{0}}{2} & 0 & \ldots & \frac{\alpha_{0}}{2} \\\frac{\alpha_{1}}{2} & {\beta_{1} + \frac{\alpha_{1} + \gamma_{1}}{2}} & {\beta_{2} + \frac{\alpha_{2} + \gamma_{2}}{2}} & \frac{\gamma_{2}}{2} & \ldots \\0 & \frac{\alpha_{2}}{2} & {\beta_{2} + \frac{\alpha_{2} + \gamma_{2}}{2}} & \frac{\gamma_{2}}{2} & 0 \\0 & 0 & \frac{\alpha_{3}}{2} & {\beta_{3} + \frac{\alpha_{2} + \gamma_{3}}{2}} & \ddots \\\vdots & \vdots & \vdots & \ddots & \ddots \\\frac{\gamma_{N - 1}}{2} & 0 & \vdots & \ddots & \ddots\end{bmatrix}$

It should be noted that, apart from the first and last rows, the sum ofeach of the element on a row is unity from the following completenessrelation:α_(n)+β_(n)+γ_(n)=1Also, the diagonal element, which are equivalent to:(1+β_(n))/2

Range in value from ½ to ¾. The maximum value of ¾ occurs when thecorresponding maximum curvature time is ½. Furthermore, the matrix isdiagonally dominant and, as long as none of the time parameters havevalues of “0” or “1,” then the matrix is strictly diagonally dominant.In such cases, the matrix is known to be non-singular “(det(A)≠0)” froma Levy-Desplanques theorem.

FIG. 11 depicts an example 1100 of an algorithm for Quadratic kCurves.The algorithm as described is non-linear in nature. Note thatconstruction of the matrix “A” and right side vector “b” assumesknowledge of the maximum curvature times for each of the maximumcurvature points. Computing maximum curvature times “t_(ci)” involvesknowledge of the locations of the Bezier endpoints “r_(i),” which arethe solutions to the matrix system. An optimization scheme as shown inalgorithm 1 of FIG. 11.

The algorithm starts by estimating the initial positions “r_(i)” of thecurve by averaging the adjacent maximum curvature points. The inner loopcomprises updating estimates for the maximum curvature times followed byupdating the coordinate positions by solving the matrix equationdescribed above. The subroutine “computeMaxCurvatureTime” solves cubicequation for a maximum curvature time. Time estimates may be improvedand then used to produce better locations. These new locations can thenbe used to re-compute a new set of time estimates and so forth until thesystem reaches convergence. In one or more implementations, convergencecriteria is defined as when the time values “t_(ci)” remain nearlyunchanged during two successive iterations.

This, in this example the tri-diagonal matrix is more sparse that theprevious example and is very fast to solve with increased stability asfewer mathematical operations are involved to solve the system. Although“open” curves are described above, “closed” curves are also contemplatedin which each of the points are internal and thus the curve does notinclude “boundary points.”

Example Procedures

The following discussion describes curve techniques that may beimplemented utilizing the previously described systems and devices.Aspects of each of the procedures may be implemented in hardware,firmware, or software, or a combination thereof. The procedures areshown as a set of blocks that specify operations performed by one ormore devices and are not necessarily limited to the orders shown forperforming the operations by the respective blocks. In portions of thefollowing discussion, reference will be made to FIGS. 1-10.

FIG. 12 depicts a procedure 1200 in an example implementation in which acurve is fit and modified by leveraging maximum curvature techniques. Acurve is fit to a plurality of segments of a plurality of data points,each of the segments including a first data point disposed betweensecond and third data points, the first data point set as a point ofmaximum curvature for the segment (block 1202). As before, the curvefitting module 108 may obtain data points 110 from a variety ofdifferent sources and fit a curve to those data points by leveraging amaximum curvature techniques such as Bezier curves.

Responsive to receipt of an input to select a data point of the curvevia the user interface, the data point is set as a point of maximumcurvature for a segment of the curve (block 1204). The data point may beone of the data points used to initially form the curve as described inrelation to FIGS. 2 and 3, a new data point as described in relation toFIG. 4, and so on.

Responsive to an input defining subsequent movement of the data point inthe user interface, the segment of the curve is fit such that the datapoint remains the point of maximum curvature for the segment of thecurve (block 1206). In this way, fitting of the curve may continue tofollow the movement such that the data point remains at a point ofmaximum curvature for the segment. A variety of other examples are alsocontemplated.

Example System and Device

FIG. 13 illustrates an example system generally at 1300 that includes anexample computing device 1302 that is representative of one or morecomputing systems and/or devices that may implement the varioustechniques described herein. This is illustrated through inclusion ofthe curve fitting module 108, which may be configured to fit and/ormanipulate curves involving data points. The computing device 1302 maybe, for example, a server of a service provider, a device associatedwith a client (e.g., a client device), an on-chip system, and/or anyother suitable computing device or computing system.

The example computing device 1302 as illustrated includes a processingsystem 1304, one or more computer-readable media 1306, and one or moreI/O interface 1308 that are communicatively coupled, one to another.Although not shown, the computing device 1302 may further include asystem bus or other data and command transfer system that couples thevarious components, one to another. A system bus can include any one orcombination of different bus structures, such as a memory bus or memorycontroller, a peripheral bus, a universal serial bus, and/or a processoror local bus that utilizes any of a variety of bus architectures. Avariety of other examples are also contemplated, such as control anddata lines.

The processing system 1304 is representative of functionality to performone or more operations using hardware. Accordingly, the processingsystem 1304 is illustrated as including hardware element 1310 that maybe configured as processors, functional blocks, and so forth. This mayinclude implementation in hardware as an application specific integratedcircuit or other logic device formed using one or more semiconductors.The hardware elements 1310 are not limited by the materials from whichthey are formed or the processing mechanisms employed therein. Forexample, processors may be comprised of semiconductor(s) and/ortransistors (e.g., electronic integrated circuits (ICs)). In such acontext, processor-executable instructions may beelectronically-executable instructions.

The computer-readable storage media 1306 is illustrated as includingmemory/storage 1312. The memory/storage 1312 represents memory/storagecapacity associated with one or more computer-readable media. Thememory/storage component 1312 may include volatile media (such as randomaccess memory (RAM)) and/or nonvolatile media (such as read only memory(ROM), Flash memory, optical disks, magnetic disks, and so forth). Thememory/storage component 1312 may include fixed media (e.g., RAM, ROM, afixed hard drive, and so on) as well as removable media (e.g., Flashmemory, a removable hard drive, an optical disc, and so forth). Thecomputer-readable media 1306 may be configured in a variety of otherways as further described below.

Input/output interface(s) 1308 are representative of functionality toallow a user to enter commands and information to computing device 1302,and also allow information to be presented to the user and/or othercomponents or devices using various input/output devices. Examples ofinput devices include a keyboard, a cursor control device (e.g., amouse), a microphone, a scanner, touch functionality (e.g., capacitiveor other sensors that are configured to detect physical touch), a camera(e.g., which may employ visible or non-visible wavelengths such asinfrared frequencies to recognize movement as gestures that do notinvolve touch), and so forth. Examples of output devices include adisplay device (e.g., a monitor or projector), speakers, a printer, anetwork card, tactile-response device, and so forth. Thus, the computingdevice 1302 may be configured in a variety of ways as further describedbelow to support user interaction.

Various techniques may be described herein in the general context ofsoftware, hardware elements, or program modules. Generally, such modulesinclude routines, programs, objects, elements, components, datastructures, and so forth that perform particular tasks or implementparticular abstract data types. The terms “module,” “functionality,” and“component” as used herein generally represent software, firmware,hardware, or a combination thereof. The features of the techniquesdescribed herein are platform-independent, meaning that the techniquesmay be implemented on a variety of commercial computing platforms havinga variety of processors.

An implementation of the described modules and techniques may be storedon or transmitted across some form of computer-readable media. Thecomputer-readable media may include a variety of media that may beaccessed by the computing device 1302. By way of example, and notlimitation, computer-readable media may include “computer-readablestorage media” and “computer-readable signal media.”

“Computer-readable storage media” may refer to media and/or devices thatenable persistent and/or non-transitory storage of information incontrast to mere signal transmission, carrier waves, or signals per se.Thus, computer-readable storage media refers to non-signal bearingmedia. The computer-readable storage media includes hardware such asvolatile and non-volatile, removable and non-removable media and/orstorage devices implemented in a method or technology suitable forstorage of information such as computer readable instructions, datastructures, program modules, logic elements/circuits, or other data.Examples of computer-readable storage media may include, but are notlimited to, RAM, ROM, EEPROM, flash memory or other memory technology,CD-ROM, digital versatile disks (DVD) or other optical storage, harddisks, magnetic cassettes, magnetic tape, magnetic disk storage or othermagnetic storage devices, or other storage device, tangible media, orarticle of manufacture suitable to store the desired information andwhich may be accessed by a computer.

“Computer-readable signal media” may refer to a signal-bearing mediumthat is configured to transmit instructions to the hardware of thecomputing device 1302, such as via a network. Signal media typically mayembody computer readable instructions, data structures, program modules,or other data in a modulated data signal, such as carrier waves, datasignals, or other transport mechanism. Signal media also include anyinformation delivery media. The term “modulated data signal” means asignal that has one or more of its characteristics set or changed insuch a manner as to encode information in the signal. By way of example,and not limitation, communication media include wired media such as awired network or direct-wired connection, and wireless media such asacoustic, RF, infrared, and other wireless media.

As previously described, hardware elements 1310 and computer-readablemedia 1306 are representative of modules, programmable device logicand/or fixed device logic implemented in a hardware form that may beemployed in some embodiments to implement at least some aspects of thetechniques described herein, such as to perform one or moreinstructions. Hardware may include components of an integrated circuitor on-chip system, an application-specific integrated circuit (ASIC), afield-programmable gate array (FPGA), a complex programmable logicdevice (CPLD), and other implementations in silicon or other hardware.In this context, hardware may operate as a processing device thatperforms program tasks defined by instructions and/or logic embodied bythe hardware as well as a hardware utilized to store instructions forexecution, e.g., the computer-readable storage media describedpreviously.

Combinations of the foregoing may also be employed to implement varioustechniques described herein. Accordingly, software, hardware, orexecutable modules may be implemented as one or more instructions and/orlogic embodied on some form of computer-readable storage media and/or byone or more hardware elements 1310. The computing device 1302 may beconfigured to implement particular instructions and/or functionscorresponding to the software and/or hardware modules. Accordingly,implementation of a module that is executable by the computing device1302 as software may be achieved at least partially in hardware, e.g.,through use of computer-readable storage media and/or hardware elements1310 of the processing system 1304. The instructions and/or functionsmay be executable/operable by one or more articles of manufacture (forexample, one or more computing devices 1302 and/or processing systems1304) to implement techniques, modules, and examples described herein.

The techniques described herein may be supported by variousconfigurations of the computing device 1302 and are not limited to thespecific examples of the techniques described herein. This functionalitymay also be implemented all or in part through use of a distributedsystem, such as over a “cloud” 1314 via a platform 1316 as describedbelow.

The cloud 1314 includes and/or is representative of a platform 1316 forresources 1318. The platform 1316 abstracts underlying functionality ofhardware (e.g., servers) and software resources of the cloud 1314. Theresources 1318 may include applications and/or data that can be utilizedwhile computer processing is executed on servers that are remote fromthe computing device 1302. Resources 1318 can also include servicesprovided over the Internet and/or through a subscriber network, such asa cellular or Wi-Fi network.

The platform 1316 may abstract resources and functions to connect thecomputing device 1302 with other computing devices. The platform 1316may also serve to abstract scaling of resources to provide acorresponding level of scale to encountered demand for the resources1318 that are implemented via the platform 1316. Accordingly, in aninterconnected device embodiment, implementation of functionalitydescribed herein may be distributed throughout the system 1300. Forexample, the functionality may be implemented in part on the computingdevice 1302 as well as via the platform 1316 that abstracts thefunctionality of the cloud 1314.

CONCLUSION

Although the invention has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the invention defined in the appended claims is not necessarilylimited to the specific features or acts described. Rather, the specificfeatures and acts are disclosed as example forms of implementing theclaimed invention.

What is claimed is:
 1. A method implemented by one or more computing devices, the method comprising: fitting a parametric curve to a segment of a plurality of data points displayed in a user interface generated by the one or more computing devices that includes a first data point on the curve disposed between second and third data points on the curve, said fitting the parametric curve includes setting a point of maximum curvature for the segment of the curve at the first data point on the curve disposed between the second and third data points such that the first data point on the curve disposed between the second and third data points remains the point of maximum curvature for the segment of the curve during subsequent free movement of the first data point on the curve disposed between the second and third data points in the user interface, the second and third data points being constrained from movement during the subsequent free movement of the first data point on the curve disposed between the second and third data points within the user interface; and outputting a result of the fitting by the one or more computing devices for display of the curve in the user interface.
 2. A method as described in claim 1, wherein the displaying of the curve includes displaying indications of the plurality of data points that are configured to be moved in the user interface responsive to one or more inputs received from a user.
 3. A method as described in claim 1, further comprising: responsive to receipt of an input to select a new data point along the curve via the user interface, setting the new data point as a point of maximum curvature for a corresponding segment of the curve; and responsive to an input defining subsequent free movement of the new data point in the user interface, fitting the corresponding segment of the curve such that the new data point remains the point of maximum curvature for the corresponding segment of the curve.
 4. A method as described in claim 2, wherein at least two other data points that also define the corresponding segment remain fixed during the subsequent free movement of the new data point.
 5. A method as described in claim 1, wherein the curve includes a plurality of said segments, each being linked, one to another, via a join point such that segments that include the join point have slopes that are generally continuous, one to another.
 6. A method as described in claim 5, wherein the fitting is performed such that subsequent movement of the curve is greater than movement performed for another segment that is adjacent to the segment.
 7. A method as described in claim 5, wherein at least one of the second or third data points are join points.
 8. A method as described in claim 1, wherein the fitting is performed by fitting one or more parametric curves to form the curve.
 9. A method as described in claim 7, wherein the one or more parametric curves include quadratic Bezier curves.
 10. A method comprising: outputting a curve having a parametric form in a user interface of a computing device; responsive to receipt of an input via the user interface to select a first data point that is part of the curve and disposed between second and third data points on the curve, setting the first data point that is part of the curve and disposed between the second and third data points on the curve as a point of maximum curvature for a segment of the curve; and responsive to an input defining subsequent free movement of the first data point that is part of the curve and disposed between the second and third data points on the curve in the user interface, fitting the segment of the curve such that the first data point that is part of the curve and disposed between the second and third data points on the curve remains part of the curve and at the point of maximum curvature for the segment of the curve, the second and third data points being constrained from movement during the subsequent free movement of the first data point that is part of the curve and disposed between the second and third data points on the curve within the user interface.
 11. A method as described in claim 10, wherein the segment of the curve includes the data point as being disposed between at least two other data points included as part of the curve.
 12. A method as described in claim 11, wherein the at least two other data points remain fixed as part of the segment of the curve during the subsequent free movement of the data point.
 13. A method as described in claim 10, wherein the curve includes a plurality of said segments, each being linked, one to another, via a join point such that segments that include the join point have slopes that are generally continuous, one to another.
 14. A system comprising at least one module implemented at least partially in hardware, the at least one module configured to perform operations comprising: fitting a curve having a parametric form to a plurality of segments of a plurality of data points, each of the segments including a first data point disposed between second and third data points, said fitting the curve includes the first data point disposed between the second and third data points set as a point of maximum curvature for the segment; responsive to receipt of an input to select a new data point on the curve displayed via the user interface, setting the new data point on the curve as a point of maximum curvature for a corresponding segment of the curve; and responsive to an input defining subsequent free movement of the new data point on the curve in the user interface, fitting the corresponding segment of the curve such that the new data point on the curve remains the point of maximum curvature for the corresponding segment of the curve, the data points neighboring the new data point on the curve being constrained from movement during the subsequent free movement of the new data point on the curve within the user interface.
 15. A system as described in claim 14, further comprising displaying the curve to include indications of the plurality of data points that are configured to be moved in the user interface responsive to one or more inputs received from a user.
 16. A system as described in claim 15, wherein at least two other data points that also define the corresponding segment remain fixed during the subsequent free movement of the new data point.
 17. A system as described in claim 14, wherein the plurality of segments are linked, one to another, via a respective join point such that segments that include the join point have slopes that are generally continuous, one to another.
 18. A system as described in claim 14, wherein the curve also includes at least one point that is not included along the curve that is configured to support manipulation of the curve.
 19. A system as described in claim 14, wherein the input to select a new data point along the curve is provided via a cursor control device, command, or gesture.
 20. A system as described in claim 17, wherein the fitting is performed such that subsequent movement of the curve is greater than movement performed for another segment that is adjacent to the segment. 